;Assembler header file for ResourceFS
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:01:39 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 30 May 1995

        [       :LNOT: :DEF: ResourceFS_Hdr
        GBLS    ResourceFS_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_FileSwitch
        GBLS    Get_FileSwitch
        ]
        [       :LNOT: :DEF: FileSwitch_Hdr
Get_FileSwitch                  SETS    "GET oslib/FileSwitch.Hdr"
        |
Get_FileSwitch                  SETS    ""
        ]
        $Get_FileSwitch

;Symbols for structure offsets and sizes
                                ^       0
ResourceFS_FileHeader_data_size #       Int
ResourceFS_FileHeader_load_addr #       Bits
ResourceFS_FileHeader_exec_addr #       Bits
ResourceFS_FileHeader_size      #       Int
ResourceFS_FileHeader_attr      #       FileSwitch_Attr
ResourceFS_FileHeader_name      #       Char
ResourceFS_FileHeader           *       @
        
        MACRO
$label                          ResourceFS_FileHeader_MEMBERS
$label._data_size               #       Int
$label._load_addr               #       Bits
$label._exec_addr               #       Bits
$label._size                    #       Int
$label._attr                    #       FileSwitch_Attr
        MEND
        
                                ^       0
ResourceFS_FileHeaderBase       ResourceFS_FileHeader_MEMBERS
ResourceFS_FileHeaderBase       *       @

                                ^       0
ResourceFS_FileData_size        #       Int
ResourceFS_FileData_data        #       Byte
ResourceFS_FileData             *       @
        
        MACRO
$label                          ResourceFS_FileData_MEMBERS
$label._size                    #       Int
        MEND
        
                                ^       0
ResourceFS_FileDataBase         ResourceFS_FileData_MEMBERS
ResourceFS_FileDataBase         *       @

                                ^       0
ResourceFS_File_header          #       ResourceFS_FileHeader
ResourceFS_File_data            #       ResourceFS_FileData
ResourceFS_File                 *       @

                                ^       0
ResourceFS_FileList_file        #       ResourceFS_File
ResourceFS_FileList             *       @


;Symbols for SWI's and SWI reason codes
XResourceFS_RegisterFiles       *       &61B40
ResourceFS_RegisterFiles        *       &41B40
   ;Entry
   ;  R0 -> file_list (ResourceFS_FileList)
   ;Exit
   ;  R0 corrupted

XResourceFS_DeregisterFiles     *       &61B41
ResourceFS_DeregisterFiles      *       &41B41
   ;Entry
   ;  R0 -> file_list (ResourceFS_FileList)
   ;Exit
   ;  R0 corrupted

Service_ResourceFSStarted       *       &59
   ;Entry
   ;  R1 = &59

Service_ResourceFSDying         *       &5A
   ;Entry
   ;  R1 = &5A

Service_ResourceFSStarting      *       &60
   ;Entry
   ;  R1 = &60
   ;  R2 -> register_files (code)
   ;  R3 = workspace (pointer to Void)

        ]
        END
